package com.company;

public class Person{
    public String name1;
    String name2;
    protected String name3;
    private String name4;
    private int age;

    public int booknum;

    public Person(){
    }

//
    public Person(String name, int age){
        this.name1 = name;
        this.age = age;
    }

    public String getName(){
        System.out.println(toString());
        return this.name1;
    }

    public void setName(String name){

        this.name1 = name;
        System.out.println(toString());
    }

    public int getAge(){
        return this.age;
    }

    public void setAge(){
        this.age = age;
    }

    private String doing(String something){
        System.out.println("正在  " + something);
        return something;

    }


    public String toString(){
        return "name = " + name1  + "     "+ "age = " + this.age;

    }



}
